package org.ncibi.cytoscape.metscape.multidisplay;

public class MultiStudyToNetworkMapping {

	private String[] animationLabelArray;
	private String[] timeStepLabelArray;
	private String[][] valueLabelMatrix;

	public MultiStudyToNetworkMapping(String[] animationLabelArray,
			String[] timeStepLabelArray,
			String[][] valueLabelMatrix) {
		this.animationLabelArray = animationLabelArray;
		this.timeStepLabelArray = timeStepLabelArray;
		this.valueLabelMatrix = valueLabelMatrix;
	}

	public int getNumberOfAnimations() {
		if (valueLabelMatrix == null)
			return 0;
		return valueLabelMatrix.length;
	}

	public int getNumberOfStudies() {
		// NOTE: the rows of labelMatrix are assumed to be the same length
		if (valueLabelMatrix == null)
			return 0;
		if (valueLabelMatrix.length == 0)
			return 0;
		if (valueLabelMatrix[0] == null)
			return 0;
		return valueLabelMatrix[0].length;
	}

	public String getAnimationLabel(int animationIndex) {
		return animationLabelArray[animationIndex];
	}
	
	public String getTimeStepLabel(int timeSeriesIndex){
		return timeStepLabelArray[timeSeriesIndex];
	}

	public String getValueLabel(int animationIndex, int valueIndex) {
		return valueLabelMatrix[animationIndex][valueIndex];
	}

}
